package introduce.foreign.method;

import java.util.Date;

/**
 * Created by Administrator on 2018/1/25.
 * 在客户类中建立一个函数，并以第一参数形式传入一个服务类实例
 */
public class Test {

    private Date previousEnd;

    void test() {
        Date newStart = new Date(previousEnd.getYear(), previousEnd.getMonth(), previousEnd.getDate() + 1);
    }

    //================================
    void testRF() {
        Date newStart = nextDay(previousEnd);
    }

    private static Date nextDay(Date date) {
        return new Date(date.getYear(), date.getMonth(), date.getDate() + 1);
    }

}
